package com.xhwl.data.controller;

import com.xhwl.common.enums.ClientTypeEnum;
import com.xhwl.common.pojo.ResultJson;
import com.xhwl.data.util.EnumListUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Author JCccc
 * @Description
 * @Date 2021/7/21 9:02
 */
@RestController
public class ClientController {
    /**
     * 业态类型选择器
     *
     * @return
     */
    @GetMapping(value = "/client/list")
    public ResultJson getClientList(@RequestHeader(value = "appId", required = true) String appId,
                                    @RequestHeader(value = "clientType", required = false) Integer clientType,
                                    @RequestHeader(value = "industryId", required = true) Short industryId) {
        List<Map<String, Object>> industryInfos = EnumListUtil.enumToListMap(ClientTypeEnum.class);
        return ResultJson.success(industryInfos);
    }
}
